﻿<!-- THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF   -->
<!-- ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO -->
<!-- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A      -->
<!-- PARTICULAR PURPOSE.                                                 -->
<!--                                                                     -->
<!-- Copyright (c) Microsoft Corporation. All rights reserved            -->

<Page
  x:Class="ToastsSampleCS.ScenarioInput5"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  mc:Ignorable="d"
  d:DesignWidth="1366"
  d:DesignHeight="768">

    <StackPanel>
        <TextBlock Style="{StaticResource DescriptionTextStyle}" TextWrapping="Wrap">
            In this scenario, the app will subscribe to events so that it can respond to the actions a user takes with a toast.
            <LineBreak/>
            <LineBreak/>
            When users click on your toast, dismiss it, or the toast times out, events are raised. You can attach listeners 
            for these events to the toast object.
            <LineBreak/>
            <LineBreak/>
            In addition, you can listen to the "Activated" event from either the toast object or the "OnLaunched" event off 
            the Windows.UI.Xaml.Application object to tell if the user clicked on your toast. The difference 
            is that the OnLaunched event is raised by toasts that arise from either local or push notifications, while the 
            toast object event is raised only by local notifications.
            <LineBreak/>
            <LineBreak/>
            You can also include a context in the toast notification payload that is specific to your app. This context can 
            be accessed by your app when your app is activated from the toast notification. The context information included 
            in the toast should be used to inform your app what action to take when it is launched through the toast. For 
            example, if the toast represents a breaking news article in a news app, the context information in the toast should 
            provide enough information so that the app can take the user directly to that story.
        </TextBlock>
        
        <StackPanel Margin="0,20,0,0">
            <Button x:Name="Scenario5DisplayToastWithCallbacks" Content="Display a toast"/>
            <Button x:Name="Scenario5HideToast" Content="Hide last toast from this scenario"/>
        </StackPanel>
    </StackPanel>
</Page>